<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body{
            padding: 0;
            margin: 0;
        }
        div {
            position: relative;
        }
        p {
            position: absolute;
            width: 200px;
            height: 200px;
        }
        .a {
            background: #f00;
            z-index: 10;
            left: 30px;
            top: 30px;
        }
        .b {
            background: #0ff;
            z-index:3;
        }
    </style>
</head>
<body>
    <div>IE6-7, 红色模块会在下面, 现代浏览器则不会</div>
    <div class="test">
        <p class="a">z-index: 10</p>
    </div>
    <div class="test2">
        <p class="b">z-index: 3</p>
    </div>

    
</body>
</html>